home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_11
/
9n11118a
< prev
next >
Wrap
Text File
|
1991-10-07
|
791b
|
31 lines
Listing 3
struct s_compare find_min_max(one, two, three);
int one, two, three; /* Input values to compare */
{
struct s_compare compare;
{
if (one > two)
{
if (one > three)
compare.maximum = one;
else
compare.maximum = three;
if (two > three)
compare.minimum = three;
else
compare.minimum = two;
else
{
if (two > three)
compare.maximum = two;
else
compare.maximum = three;
if (one > three)
compare.minimum = three;
else
compare.minimum = one;
}
return compare;
}